/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SLE_IPC_INTERFACE_CONNECT_H
#define SLE_IPC_INTERFACE_CONNECT_H

#include "iremote_broker.h"
#include "i_sle_connect_callback.h"
#include "sle_address_parcel.h"
#include "sle_connect_parcel.h"
#include "sle_ipc_interface_code.h"
#include "sle_error_code.h"

namespace OHOS {
namespace NearLink {
namespace SleStandard {
class ISleConnect : public OHOS::IRemoteBroker {
public:
    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.ISleConnect");

    virtual SleErrorCode RegisterConnectCallback(const sptr<ISleConnectCallback> &callback) = 0;
    virtual SleErrorCode UnregisterConnectCallback(const sptr<ISleConnectCallback> &callback) = 0;
    virtual SleErrorCode Connect(const SleAddress &address) = 0;
    virtual SleErrorCode Disconnect(const SleAddress &address) = 0;
    virtual SleErrorCode GetConnectId(const SleAddress &address, uint16_t &connectId) = 0;
    virtual SleErrorCode GetConnectState(const SleAddress &address, int32_t &state) = 0;
    virtual SleErrorCode GetConnectDeviceList(std::vector<SleConnectDevice> &devices, uint16_t &number) = 0;
    virtual SleErrorCode UpdateConnectParam(uint16_t connectId, const SleConnectionParam &param) = 0;
    virtual SleErrorCode UpdateAllConnectParam(std::vector<SleConnectDevice> &successUpdateDevList, uint16_t &number) = 0;
    virtual SleErrorCode GetRecomSendDataSize(uint16_t connectId, uint32_t &recomSendDataSize) = 0;
    virtual SleErrorCode SendPairRequest(const SleAddress &address) = 0;
    virtual SleErrorCode RemovePairedDevice(const SleAddress &address) = 0;
    virtual SleErrorCode RemoveAllPairedDevices() = 0;
    virtual SleErrorCode GetPairedDevicesNum(uint16_t &number) = 0;
    virtual SleErrorCode GetPairedDevices(std::vector<SleAddress> &devices, uint16_t &number) = 0;
    virtual SleErrorCode GetPairState(const SleAddress &address, uint8_t &state) = 0;
    virtual SleErrorCode ReadRemoteRssi(uint16_t connectId) = 0;
};
} // SleStandard
} // NearLink
} // OHOS

#endif // SLE_IPC_INTERFACE_CONNECT_H